
Introduction of SQL server
Install SQL Server And SQL Server Management Studio
Create, Rename, and Delete Database
Create, Delete and rename table in SQL server database
Add, Rename And Delete column name
Records insert, update & delete
Select statement
Select Unique and Distinct statement
Select into statement
Insert, update and delete statement
Aggregate function count, max, min, sum, avg
What are SQL Joins
Introduction to Group by Clause
Introduction to Having Clause
Introduction to Order by clause
Introduction to Where clause
AND & OR Operator
Arithmetic Operator
Between Operator
Comparison Operator
While loop
Break and continue statement
Introduction to Stored Procedures
Select Statement Inside the Stored procedure
Insert Statement Inside a Stored Procedure
Update Statement within the Stored Procedure
Input Parameters in a Stored Procedures
Output Parameters in a Stored Procedure
Return Values in a Stored Procedure
Insert Stored Procedure output into Temporary Table
Introduction to function
Introduction to SQL View
Useful System Stored Procedures
Temporary Table: Temporary tables, are very similar to the permanent tables. Permanent tables get created in the database you specify, and remain in the database permanently until you delete(drop) them. On the other hand, temporary tables get created in the TempDB and are automatically deleted, when they are no longer used.
Different Type of Temporary tables:
- Local Temporary tables using #
- Global Temporary tables using ##
Now Insert Stored Procedure output into Temporary Table:
/*CREATE PROCEDURE*/
CREATE PROCEDURE GetTemporaryTable
AS
BEGIN
CREATE TABLE #Persons (
#Id int,
#Name varchar(250),
);
insert into #Persons values(1,'Jesy')
END
EXEC [dbo].[GetTemporaryTable]
In this stored procedure create a temporary table name as #Persons then insert value into table.